package com.d3works.apps.businesssupport.db.repo;

import com.d3works.apps.businesssupport.db.ProjectAnnouncement;
import com.d3works.apps.project.service.ProjectTaskService;
import com.google.inject.Inject;

public class ProjectAnnouncementBusinessSupportRepository extends ProjectAnnouncementRepository {

  @Inject ProjectTaskService projectTaskService;

  @Override
  public ProjectAnnouncement save(ProjectAnnouncement entity) {
    String content = entity.getContent();
    entity.setContent(projectTaskService.getTaskLink(content));
    return super.save(entity);
  }
}
